"use strict";
const t = require("../common/vendor.js");
var e = 310,
  i = "请求参数信息有误",
  s = 600,
  o = "系统错误",
  r = 1e3,
  a = 200,
  n = "https://apis.map.qq.com/ws/",
  l = n + "place/v1/suggestion",
  d = "driving",
  c = "transit",
  u = {
    safeAdd(t, e) {
      var i = (65535 & t) + (65535 & e);
      return (t >> 16) + (e >> 16) + (i >> 16) << 16 | 65535 & i
    },
    bitRotateLeft: (t, e) => t << e | t >>> 32 - e,
    md5cmn(t, e, i, s, o, r) {
      return this.safeAdd(this.bitRotateLeft(this.safeAdd(this.safeAdd(e, t), this.safeAdd(s, r)), o), i)
    },
    md5ff(t, e, i, s, o, r, a) {
      return this.md5cmn(e & i | ~e & s, t, e, o, r, a)
    },
    md5gg(t, e, i, s, o, r, a) {
      return this.md5cmn(e & s | i & ~s, t, e, o, r, a)
    },
    md5hh(t, e, i, s, o, r, a) {
      return this.md5cmn(e ^ i ^ s, t, e, o, r, a)
    },
    md5ii(t, e, i, s, o, r, a) {
      return this.md5cmn(i ^ (e | ~s), t, e, o, r, a)
    },
    binlMD5(t, e) {
      var i, s, o, r, a;
      t[e >> 5] |= 128 << e % 32, t[14 + (e + 64 >>> 9 << 4)] = e;
      var n = 1732584193,
        l = -271733879,
        d = -1732584194,
        c = 271733878;
      for (i = 0; i < t.length; i += 16) s = n, o = l, r = d, a = c, n = this.md5ff(n, l, d, c, t[i], 7, -680876936), c = this.md5ff(c, n, l, d, t[i + 1], 12, -389564586), d = this.md5ff(d, c, n, l, t[i + 2], 17, 606105819), l = this.md5ff(l, d, c, n, t[i + 3], 22, -1044525330), n = this.md5ff(n, l, d, c, t[i + 4], 7, -176418897), c = this.md5ff(c, n, l, d, t[i + 5], 12, 1200080426), d = this.md5ff(d, c, n, l, t[i + 6], 17, -1473231341), l = this.md5ff(l, d, c, n, t[i + 7], 22, -45705983), n = this.md5ff(n, l, d, c, t[i + 8], 7, 1770035416), c = this.md5ff(c, n, l, d, t[i + 9], 12, -1958414417), d = this.md5ff(d, c, n, l, t[i + 10], 17, -42063), l = this.md5ff(l, d, c, n, t[i + 11], 22, -1990404162), n = this.md5ff(n, l, d, c, t[i + 12], 7, 1804603682), c = this.md5ff(c, n, l, d, t[i + 13], 12, -40341101), d = this.md5ff(d, c, n, l, t[i + 14], 17, -1502002290), l = this.md5ff(l, d, c, n, t[i + 15], 22, 1236535329), n = this.md5gg(n, l, d, c, t[i + 1], 5, -165796510), c = this.md5gg(c, n, l, d, t[i + 6], 9, -1069501632), d = this.md5gg(d, c, n, l, t[i + 11], 14, 643717713), l = this.md5gg(l, d, c, n, t[i], 20, -373897302), n = this.md5gg(n, l, d, c, t[i + 5], 5, -701558691), c = this.md5gg(c, n, l, d, t[i + 10], 9, 38016083), d = this.md5gg(d, c, n, l, t[i + 15], 14, -660478335), l = this.md5gg(l, d, c, n, t[i + 4], 20, -405537848), n = this.md5gg(n, l, d, c, t[i + 9], 5, 568446438), c = this.md5gg(c, n, l, d, t[i + 14], 9, -1019803690), d = this.md5gg(d, c, n, l, t[i + 3], 14, -187363961), l = this.md5gg(l, d, c, n, t[i + 8], 20, 1163531501), n = this.md5gg(n, l, d, c, t[i + 13], 5, -1444681467), c = this.md5gg(c, n, l, d, t[i + 2], 9, -51403784), d = this.md5gg(d, c, n, l, t[i + 7], 14, 1735328473), l = this.md5gg(l, d, c, n, t[i + 12], 20, -1926607734), n = this.md5hh(n, l, d, c, t[i + 5], 4, -378558), c = this.md5hh(c, n, l, d, t[i + 8], 11, -2022574463), d = this.md5hh(d, c, n, l, t[i + 11], 16, 1839030562), l = this.md5hh(l, d, c, n, t[i + 14], 23, -35309556), n = this.md5hh(n, l, d, c, t[i + 1], 4, -1530992060), c = this.md5hh(c, n, l, d, t[i + 4], 11, 1272893353), d = this.md5hh(d, c, n, l, t[i + 7], 16, -155497632), l = this.md5hh(l, d, c, n, t[i + 10], 23, -1094730640), n = this.md5hh(n, l, d, c, t[i + 13], 4, 681279174), c = this.md5hh(c, n, l, d, t[i], 11, -358537222), d = this.md5hh(d, c, n, l, t[i + 3], 16, -722521979), l = this.md5hh(l, d, c, n, t[i + 6], 23, 76029189), n = this.md5hh(n, l, d, c, t[i + 9], 4, -640364487), c = this.md5hh(c, n, l, d, t[i + 12], 11, -421815835), d = this.md5hh(d, c, n, l, t[i + 15], 16, 530742520), l = this.md5hh(l, d, c, n, t[i + 2], 23, -995338651), n = this.md5ii(n, l, d, c, t[i], 6, -198630844), c = this.md5ii(c, n, l, d, t[i + 7], 10, 1126891415), d = this.md5ii(d, c, n, l, t[i + 14], 15, -1416354905), l = this.md5ii(l, d, c, n, t[i + 5], 21, -57434055), n = this.md5ii(n, l, d, c, t[i + 12], 6, 1700485571), c = this.md5ii(c, n, l, d, t[i + 3], 10, -1894986606), d = this.md5ii(d, c, n, l, t[i + 10], 15, -1051523), l = this.md5ii(l, d, c, n, t[i + 1], 21, -2054922799), n = this.md5ii(n, l, d, c, t[i + 8], 6, 1873313359), c = this.md5ii(c, n, l, d, t[i + 15], 10, -30611744), d = this.md5ii(d, c, n, l, t[i + 6], 15, -1560198380), l = this.md5ii(l, d, c, n, t[i + 13], 21, 1309151649), n = this.md5ii(n, l, d, c, t[i + 4], 6, -145523070), c = this.md5ii(c, n, l, d, t[i + 11], 10, -1120210379), d = this.md5ii(d, c, n, l, t[i + 2], 15, 718787259), l = this.md5ii(l, d, c, n, t[i + 9], 21, -343485551), n = this.safeAdd(n, s), l = this.safeAdd(l, o), d = this.safeAdd(d, r), c = this.safeAdd(c, a);
      return [n, l, d, c]
    },
    binl2rstr(t) {
      var e, i = "",
        s = 32 * t.length;
      for (e = 0; e < s; e += 8) i += String.fromCharCode(t[e >> 5] >>> e % 32 & 255);
      return i
    },
    rstr2binl(t) {
      var e, i = [];
      for (i[(t.length >> 2) - 1] = void 0, e = 0; e < i.length; e += 1) i[e] = 0;
      var s = 8 * t.length;
      for (e = 0; e < s; e += 8) i[e >> 5] |= (255 & t.charCodeAt(e / 8)) << e % 32;
      return i
    },
    rstrMD5(t) {
      return this.binl2rstr(this.binlMD5(this.rstr2binl(t), 8 * t.length))
    },
    rstrHMACMD5(t, e) {
      var i, s, o = this.rstr2binl(t),
        r = [],
        a = [];
      for (r[15] = a[15] = void 0, o.length > 16 && (o = this.binlMD5(o, 8 * t.length)), i = 0; i < 16; i += 1) r[i] = 909522486 ^ o[i], a[i] = 1549556828 ^ o[i];
      return s = this.binlMD5(r.concat(this.rstr2binl(e)), 512 + 8 * e.length), this.binl2rstr(this.binlMD5(a.concat(s), 640))
    },
    rstr2hex(t) {
      var e, i, s = "0123456789abcdef",
        o = "";
      for (i = 0; i < t.length; i += 1) e = t.charCodeAt(i), o += s.charAt(e >>> 4 & 15) + s.charAt(15 & e);
      return o
    },
    str2rstrUTF8: t => unescape(encodeURIComponent(t)),
    rawMD5(t) {
      return this.rstrMD5(this.str2rstrUTF8(t))
    },
    hexMD5(t) {
      return this.rstr2hex(this.rawMD5(t))
    },
    rawHMACMD5(t, e) {
      return this.rstrHMACMD5(this.str2rstrUTF8(t), str2rstrUTF8(e))
    },
    hexHMACMD5(t, e) {
      return this.rstr2hex(this.rawHMACMD5(t, e))
    },
    md5(t, e, i) {
      return e ? i ? this.rawHMACMD5(e, t) : this.hexHMACMD5(e, t) : i ? this.rawMD5(t) : this.hexMD5(t)
    },
    getSig(t, e, i, s) {
      var o = null,
        r = [];
      return Object.keys(t).sort().forEach((function (e) {
        r.push(e + "=" + t[e])
      })), "search" == i && (o = "/ws/place/v1/search?" + r.join("&") + e), "suggest" == i && (o = "/ws/place/v1/suggestion?" + r.join("&") + e), "reverseGeocoder" == i && (o = "/ws/geocoder/v1/?" + r.join("&") + e), "geocoder" == i && (o = "/ws/geocoder/v1/?" + r.join("&") + e), "getCityList" == i && (o = "/ws/district/v1/list?" + r.join("&") + e), "getDistrictByCityId" == i && (o = "/ws/district/v1/getchildren?" + r.join("&") + e), "calculateDistance" == i && (o = "/ws/distance/v1/?" + r.join("&") + e), "direction" == i && (o = "/ws/direction/v1/" + s + "?" + r.join("&") + e), o = this.md5(o)
    },
    location2query(t) {
      if ("string" == typeof t) return t;
      for (var e = "", i = 0; i < t.length; i++) {
        var s = t[i];
        e && (e += ";"), s.location && (e = e + s.location.lat + "," + s.location.lng), s.latitude && s.longitude && (e = e + s.latitude + "," + s.longitude)
      }
      return e
    },
    rad: t => t * Math.PI / 180,
    getEndLocation(t) {
      for (var e = t.split(";"), i = [], s = 0; s < e.length; s++) i.push({
        lat: parseFloat(e[s].split(",")[0]),
        lng: parseFloat(e[s].split(",")[1])
      });
      return i
    },
    getDistance(t, e, i, s) {
      var o = this.rad(t),
        r = this.rad(i),
        a = o - r,
        n = this.rad(e) - this.rad(s),
        l = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(o) * Math.cos(r) * Math.pow(Math.sin(n / 2), 2)));
      return l *= 6378136.49, l = Math.round(1e4 * l) / 1e4, parseFloat(l.toFixed(0))
    },
    getWXLocation(e, i, s) {
      t.wx$1.getLocation({
        type: "gcj02",
        success: e,
        fail: i,
        complete: s
      })
    },
    getLocationParam(t) {
      if ("string" == typeof t) {
        var e = t.split(",");
        t = 2 === e.length ? {
          latitude: t.split(",")[0],
          longitude: t.split(",")[1]
        } : {}
      }
      return t
    },
    polyfillParam(t) {
      t.success = t.success || function () {}, t.fail = t.fail || function () {}, t.complete = t.complete || function () {}
    },
    checkParamKeyEmpty(t, s) {
      if (!t[s]) {
        var o = this.buildErrorConfig(e, i + s + "参数格式有误");
        return t.fail(o), t.complete(o), !0
      }
      return !1
    },
    checkKeyword(t) {
      return !this.checkParamKeyEmpty(t, "keyword")
    },
    checkLocation(t) {
      var s = this.getLocationParam(t.location);
      if (!s || !s.latitude || !s.longitude) {
        var o = this.buildErrorConfig(e, i + " location参数格式有误");
        return t.fail(o), t.complete(o), !1
      }
      return !0
    },
    buildErrorConfig: (t, e) => ({
      status: t,
      message: e
    }),
    handleData(t, e, i) {
      if ("search" == i) {
        for (var s = e.data, o = [], r = 0; r < s.length; r++) o.push({
          id: s[r].id || null,
          title: s[r].title || null,
          latitude: s[r].location && s[r].location.lat || null,
          longitude: s[r].location && s[r].location.lng || null,
          address: s[r].address || null,
          category: s[r].category || null,
          tel: s[r].tel || null,
          adcode: s[r].ad_info && s[r].ad_info.adcode || null,
          city: s[r].ad_info && s[r].ad_info.city || null,
          district: s[r].ad_info && s[r].ad_info.district || null,
          province: s[r].ad_info && s[r].ad_info.province || null
        });
        t.success(e, {
          searchResult: s,
          searchSimplify: o
        })
      } else if ("suggest" == i) {
        var a = e.data,
          n = [];
        for (r = 0; r < a.length; r++) n.push({
          adcode: a[r].adcode || null,
          address: a[r].address || null,
          category: a[r].category || null,
          city: a[r].city || null,
          district: a[r].district || null,
          id: a[r].id || null,
          latitude: a[r].location && a[r].location.lat || null,
          longitude: a[r].location && a[r].location.lng || null,
          province: a[r].province || null,
          title: a[r].title || null,
          type: a[r].type || null
        });
        t.success(e, {
          suggestResult: a,
          suggestSimplify: n
        })
      } else if ("reverseGeocoder" == i) {
        var l = e.result,
          d = {
            address: l.address || null,
            latitude: l.location && l.location.lat || null,
            longitude: l.location && l.location.lng || null,
            adcode: l.ad_info && l.ad_info.adcode || null,
            city: l.address_component && l.address_component.city || null,
            district: l.address_component && l.address_component.district || null,
            nation: l.address_component && l.address_component.nation || null,
            province: l.address_component && l.address_component.province || null,
            street: l.address_component && l.address_component.street || null,
            street_number: l.address_component && l.address_component.street_number || null,
            recommend: l.formatted_addresses && l.formatted_addresses.recommend || null,
            rough: l.formatted_addresses && l.formatted_addresses.rough || null
          };
        if (l.pois) {
          var c = l.pois,
            u = [];
          for (r = 0; r < c.length; r++) u.push({
            id: c[r].id || null,
            title: c[r].title || null,
            latitude: c[r].location && c[r].location.lat || null,
            longitude: c[r].location && c[r].location.lng || null,
            address: c[r].address || null,
            category: c[r].category || null,
            adcode: c[r].ad_info && c[r].ad_info.adcode || null,
            city: c[r].ad_info && c[r].ad_info.city || null,
            district: c[r].ad_info && c[r].ad_info.district || null,
            province: c[r].ad_info && c[r].ad_info.province || null
          });
          t.success(e, {
            reverseGeocoderResult: l,
            reverseGeocoderSimplify: d,
            pois: c,
            poisSimplify: u
          })
        } else t.success(e, {
          reverseGeocoderResult: l,
          reverseGeocoderSimplify: d
        })
      } else if ("geocoder" == i) {
        var g = e.result,
          h = {
            title: g.title || null,
            latitude: g.location && g.location.lat || null,
            longitude: g.location && g.location.lng || null,
            adcode: g.ad_info && g.ad_info.adcode || null,
            province: g.address_components && g.address_components.province || null,
            city: g.address_components && g.address_components.city || null,
            district: g.address_components && g.address_components.district || null,
            street: g.address_components && g.address_components.street || null,
            street_number: g.address_components && g.address_components.street_number || null,
            level: g.level || null
          };
        t.success(e, {
          geocoderResult: g,
          geocoderSimplify: h
        })
      } else if ("getCityList" == i) {
        var m = e.result[0],
          f = e.result[1],
          p = e.result[2];
        t.success(e, {
          provinceResult: m,
          cityResult: f,
          districtResult: p
        })
      } else if ("getDistrictByCityId" == i) {
        var y = e.result[0];
        t.success(e, y)
      } else if ("calculateDistance" == i) {
        var _ = e.result.elements,
          v = [];
        for (r = 0; r < _.length; r++) v.push(_[r].distance);
        t.success(e, {
          calculateDistanceResult: _,
          distance: v
        })
      } else if ("direction" == i) {
        var b = e.result.routes;
        t.success(e, b)
      } else t.success(e)
    },
    buildWxRequestConfig(t, e, i) {
      var n = this;
      return e.header = {
        "content-type": "application/json"
      }, e.method = "GET", e.success = function (e) {
        var s = e.data;
        0 === s.status ? n.handleData(t, s, i) : t.fail(s)
      }, e.fail = function (e) {
        e.statusCode = r, t.fail(n.buildErrorConfig(r, e.errMsg))
      }, e.complete = function (e) {
        switch (+e.statusCode) {
          case r:
            t.complete(n.buildErrorConfig(r, e.errMsg));
            break;
          case a:
            var i = e.data;
            0 === i.status ? t.complete(i) : t.complete(n.buildErrorConfig(i.status, i.message));
            break;
          default:
            t.complete(n.buildErrorConfig(s, o))
        }
      }, e
    },
    locationProcess(t, e, i, s) {
      var o = this;
      if (i = i || function (e) {
          e.statusCode = r, t.fail(o.buildErrorConfig(r, e.errMsg))
        }, s = s || function (e) {
          e.statusCode == r && t.complete(o.buildErrorConfig(r, e.errMsg))
        }, t.location) {
        if (o.checkLocation(t)) {
          e(u.getLocationParam(t.location))
        }
      } else o.getWXLocation(e, i, s)
    }
  };
exports.QQMapWX = class {
  constructor(t) {
    if (!t.key) throw Error("key值不能为空");
    this.key = t.key
  }
  search(e) {
    if (e = e || {}, u.polyfillParam(e), u.checkKeyword(e)) {
      var i = {
        keyword: e.keyword,
        orderby: e.orderby || "_distance",
        page_size: e.page_size || 10,
        page_index: e.page_index || 1,
        output: "json",
        key: this.key
      };
      e.address_format && (i.address_format = e.address_format), e.filter && (i.filter = e.filter);
      var s = e.distance || "1000",
        o = e.auto_extend || 1,
        r = null,
        a = null;
      e.region && (r = e.region), e.rectangle && (a = e.rectangle);
      u.locationProcess(e, (function (n) {
        r && !a ? (i.boundary = "region(" + r + "," + o + "," + n.latitude + "," + n.longitude + ")", e.sig && (i.sig = u.getSig(i, e.sig, "search"))) : a && !r ? (i.boundary = "rectangle(" + a + ")", e.sig && (i.sig = u.getSig(i, e.sig, "search"))) : (i.boundary = "nearby(" + n.latitude + "," + n.longitude + "," + s + "," + o + ")", e.sig && (i.sig = u.getSig(i, e.sig, "search"))), t.wx$1.request(u.buildWxRequestConfig(e, {
          url: "https://apis.map.qq.com/ws/place/v1/search",
          data: i
        }, "search"))
      }))
    }
  }
  getSuggestion(e) {
    if (e = e || {}, u.polyfillParam(e), u.checkKeyword(e)) {
      var i = {
        keyword: e.keyword,
        region: e.region || "全国",
        region_fix: e.region_fix || 0,
        policy: e.policy || 0,
        page_size: e.page_size || 10,
        page_index: e.page_index || 1,
        get_subpois: e.get_subpois || 0,
        output: "json",
        key: this.key
      };
      if (e.address_format && (i.address_format = e.address_format), e.filter && (i.filter = e.filter), e.location) {
        u.locationProcess(e, (function (s) {
          i.location = s.latitude + "," + s.longitude, e.sig && (i.sig = u.getSig(i, e.sig, "suggest")), t.wx$1.request(u.buildWxRequestConfig(e, {
            url: l,
            data: i
          }, "suggest"))
        }))
      } else e.sig && (i.sig = u.getSig(i, e.sig, "suggest")), t.wx$1.request(u.buildWxRequestConfig(e, {
        url: l,
        data: i
      }, "suggest"))
    }
  }
  reverseGeocoder(e) {
    e = e || {}, u.polyfillParam(e);
    var i = {
      coord_type: e.coord_type || 5,
      get_poi: e.get_poi || 0,
      output: "json",
      key: this.key
    };
    e.poi_options && (i.poi_options = e.poi_options);
    u.locationProcess(e, (function (s) {
      i.location = s.latitude + "," + s.longitude, e.sig && (i.sig = u.getSig(i, e.sig, "reverseGeocoder")), t.wx$1.request(u.buildWxRequestConfig(e, {
        url: "https://apis.map.qq.com/ws/geocoder/v1/",
        data: i
      }, "reverseGeocoder"))
    }))
  }
  geocoder(e) {
    if (e = e || {}, u.polyfillParam(e), !u.checkParamKeyEmpty(e, "address")) {
      var i = {
        address: e.address,
        output: "json",
        key: this.key
      };
      e.region && (i.region = e.region), e.sig && (i.sig = u.getSig(i, e.sig, "geocoder")), t.wx$1.request(u.buildWxRequestConfig(e, {
        url: "https://apis.map.qq.com/ws/geocoder/v1/",
        data: i
      }, "geocoder"))
    }
  }
  getCityList(e) {
    e = e || {}, u.polyfillParam(e);
    var i = {
      output: "json",
      key: this.key
    };
    e.sig && (i.sig = u.getSig(i, e.sig, "getCityList")), t.wx$1.request(u.buildWxRequestConfig(e, {
      url: "https://apis.map.qq.com/ws/district/v1/list",
      data: i
    }, "getCityList"))
  }
  getDistrictByCityId(e) {
    if (e = e || {}, u.polyfillParam(e), !u.checkParamKeyEmpty(e, "id")) {
      var i = {
        id: e.id || "",
        output: "json",
        key: this.key
      };
      e.sig && (i.sig = u.getSig(i, e.sig, "getDistrictByCityId")), t.wx$1.request(u.buildWxRequestConfig(e, {
        url: "https://apis.map.qq.com/ws/district/v1/getchildren",
        data: i
      }, "getDistrictByCityId"))
    }
  }
  calculateDistance(e) {
    if (e = e || {}, u.polyfillParam(e), !u.checkParamKeyEmpty(e, "to")) {
      var i = {
        mode: e.mode || "walking",
        to: u.location2query(e.to),
        output: "json",
        key: this.key
      };
      if (e.from && (e.location = e.from), "straight" == i.mode) {
        var s = function (t) {
          for (var s = u.getEndLocation(i.to), o = {
              message: "query ok",
              result: {
                elements: []
              },
              status: 0
            }, r = 0; r < s.length; r++) o.result.elements.push({
            distance: u.getDistance(t.latitude, t.longitude, s[r].lat, s[r].lng),
            duration: 0,
            from: {
              lat: t.latitude,
              lng: t.longitude
            },
            to: {
              lat: s[r].lat,
              lng: s[r].lng
            }
          });
          var a = o.result.elements,
            n = [];
          for (r = 0; r < a.length; r++) n.push(a[r].distance);
          return e.success(o, {
            calculateResult: a,
            distanceResult: n
          })
        };
        u.locationProcess(e, s)
      } else {
        s = function (s) {
          i.from = s.latitude + "," + s.longitude, e.sig && (i.sig = u.getSig(i, e.sig, "calculateDistance")), t.wx$1.request(u.buildWxRequestConfig(e, {
            url: "https://apis.map.qq.com/ws/distance/v1/",
            data: i
          }, "calculateDistance"))
        };
        u.locationProcess(e, s)
      }
    }
  }
  direction(e) {
    if (e = e || {}, u.polyfillParam(e), !u.checkParamKeyEmpty(e, "to")) {
      var i = {
        output: "json",
        key: this.key
      };
      "string" == typeof e.to ? i.to = e.to : i.to = e.to.latitude + "," + e.to.longitude;
      var s;
      e.mode = e.mode || d, s = "https://apis.map.qq.com/ws/direction/v1/" + e.mode, e.from && (e.location = e.from), e.mode == d && (e.from_poi && (i.from_poi = e.from_poi), e.heading && (i.heading = e.heading), e.speed && (i.speed = e.speed), e.accuracy && (i.accuracy = e.accuracy), e.road_type && (i.road_type = e.road_type), e.to_poi && (i.to_poi = e.to_poi), e.from_track && (i.from_track = e.from_track), e.waypoints && (i.waypoints = e.waypoints), e.policy && (i.policy = e.policy), e.plate_number && (i.plate_number = e.plate_number)), e.mode == c && (e.departure_time && (i.departure_time = e.departure_time), e.policy && (i.policy = e.policy));
      u.locationProcess(e, (function (o) {
        i.from = o.latitude + "," + o.longitude, e.sig && (i.sig = u.getSig(i, e.sig, "direction", e.mode)), t.wx$1.request(u.buildWxRequestConfig(e, {
          url: s,
          data: i
        }, "direction"))
      }))
    }
  }
};